/*--------------------------------------------------------------------------------------*\
**
**			Heroes IV
**	  Copyright 2001, The 3DO Company
**
**      town_prison_window.cpp
\*--------------------------------------------------------------------------------------*/

#ifndef TOWN_PRISON_WINDOW_H
#define TOWN_PRISON_WINDOW_H

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

// kill the 255+ character identifier warning.  Templates tend to exceed that easily.
#pragma warning( disable: 4786 )

#include "vector"

#include "bitmap_group_ptr.h"
#include "game_window.h"
#include "town.h"

class   t_adventure_frame;
class   t_bitmap_layer_window;
class   t_button;
class   t_hero;
class   t_scrollbar;
class   t_text_window;

class t_town_prison_window : public t_window
{
public:
	t_town_prison_window( t_town* town, t_adventure_frame* frame, t_window* parent);

private:
    t_adventure_frame*                  m_adventure_frame;
	t_bitmap_group_ptr                  m_bitmaps_ptr;
    int                                 m_cur_window_index;
	t_bitmap_group_ptr                  m_flags_bitmaps_ptr;
    int                                 m_frame_index;
	std::vector<t_hero*>                m_heroes_list;
	t_bitmap_layer_window*              m_main_alignment_ptr;
	t_text_window *                     m_main_name_ptr;
	t_text_window *                     m_main_class_ptr;
	t_text_window *                     m_main_level_ptr;
	t_bitmap_layer_window*              m_main_flag_ptr;
	t_bitmap_layer_window*              m_main_portrait;
	std::vector<t_bitmap_layer_window*> m_portrait_border_list;
	std::vector<t_window*>              m_portrait_flag_list;
	std::vector<t_bitmap_layer_window*> m_portrait_highlight_border_list;
	std::vector<t_bitmap_layer_window*> m_portrait_window_list;
    int                                 m_prisoner_index;
    t_prisoner_list                     m_prisoners;
	t_scrollbar *                       m_scrollbar;

    void    close_click( t_button *button_ptr );
    void    create_frames( t_screen_point const& origin, int num_frames, t_window* parent );
    void    portrait_clicked( t_button *button_ptr, int index );
    void    scrollbar_move( t_scrollbar* scrollbar, int value );
    void    set_highlight( int index );
    void    update_frames( int index );

};

#endif //TOWN_PRISON_WINDOW_H
